home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / TPWENG / TBLUNLCK.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-22  |  583b  |  29 lines

  1. program TblUnlck;
  2. uses PXEngine, WinCrt;
  3.  
  4. const TableName = 'Table';
  5.       NetDir    = '';
  6.       NetType    = NotOnNet ;
  7.  
  8. var   PxErr: Integer;
  9.       TblHandle: TableHandle;
  10.  
  11. procedure PX(Code : integer);
  12. begin
  13.   writeln(PXErrMsg(Code));
  14. end;
  15.  
  16. begin
  17.   PX(PXWinInit('MyApp', pxShared));
  18.   PX(PXTblOpen(TableName,TblHandle, 0, False));
  19.   PX(PXNetTblLock(TblHandle, FL));
  20.  
  21.   (* Remove full-lock from a table *)
  22.   PxErr := PXNetTblUnlock(TblHandle, FL);
  23.   if PxErr <> PxSuccess then
  24.     Writeln(PxErrMsg(PxErr));
  25.  
  26.   PX(PXTblClose(TblHandle));
  27.   PX(PXExit);
  28. end.
  29.